// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */

import Search from '@/views/search/Search';
import AddExcelInfo from '@/views/addInfo/AddExcelInfo';
import ApplyImgSave from '@/views/applyImgSave/ApplyImgSave';
import ApproImgSave from '@/views/approImgSave/ApproImgSave';
import FeedImgSave from '@/views/feedImgSave/FeedImgSave';

import CarType from '@/views/manager/CarType';
import CarBussType from '@/views/manager/CarType';
import RoadType from '@/views/manager/CarType';
import Satistics from '@/views/statistics/Statistics'
import TotalSearch from '@/views/statistics/TotalSearch'


// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
  routes: [
    {
      path: '/',
      name: '',
      component: login,
      hidden: true,
      meta: {
        requireAuth: false
      }
    },
    {
      path: '/login',
      name: '登录',
      component: login,
      hidden: true,
      meta: {
        requireAuth: false
      }
    },
    {
      path: '/index',
      name: '首页',
      component: index,
      iconCls: 'el-icon-tickets',
      children:
        [
          {
            path: '/search/Search',
            name: '统计查询',
            component: Search,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/addInfo/AddExcelInfo',
            name: '申请车辆信息录入',
            component: AddExcelInfo,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/satistics/Satistics',
            name: '汇总信息查询',
            component: Satistics,
            meta: {
              requireAuth: true
            }
          },{
          path: '/satistics/TotalSearch',
          name: '统计信息查询',
          component: TotalSearch,
          meta: {
            requireAuth: true
          }
        }, {
            path: '/applyImgSave/ApplyImgSave',
            name: '申办单存档',
            component: ApplyImgSave,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/approImgSave/ApproImgSave',
            name: '批办单存档',
            component: ApproImgSave,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/feedImgSave/FeedImgSave',
            name: '速通反馈存档',
            component: FeedImgSave,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/manager/carType',
            name: '车辆类型维护',
            component: CarType,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/manager/roadType',
            name: '路类型维护',
            component: RoadType,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/manager/carBussType',
            name: '业务类型维护',
            component: CarBussType,
            meta: {
              requireAuth: true
            }
          }
        ]
    }
  ]

})
